package org.feiye.studyday25;

import java.io.*;
import java.util.List;

import org.feiye.studyday21.prictice.Student;

public class FanXuLieHua {

	public static void main(String[] args) {
		// 反序列化展示对象信息
		ObjectInputStream oin = null;
		try {
			oin = new ObjectInputStream(new FileInputStream("F:\\叶飞io测试\\obj.txt"));
			@SuppressWarnings("unchecked")
			List<Student> list = (List<Student>) oin.readObject();
			for (Student student : list) {
				System.out.println(student);
			}

		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			if (oin != null)
				try {
					oin.close();
				} catch (IOException e) {
					e.printStackTrace();
				}
		}
	}

}
